const { defineConfig } = require("@vue/cli-service");
const env = process.env.VUE_APP_ENV;
module.exports = defineConfig({
  publicPath: "../",
  outputDir: "packages/ui/dist", // 构建时输出目录
  assetsDir: "appstoreapp/cti-repository/statics", // 放置生成的静态资源的目录
  transpileDependencies: true,
  lintOnSave: false,
  productionSourceMap: false,
  configureWebpack: {
    resolve: {
      fallback: {
        path: require.resolve("path-browserify"),
      },
    },
  },
  devServer: {
    open: true,
    proxy: {
      [env]: {
        target: `https://43.198.184.4:33000`, // 测试
        changeOrigin: true,
        pathRewrite: {
          ["^/" + env]: "",
        },
      },
    },
  },
});
